package com.neusoft.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neusoft.mapper.UserAddressMapper;
import com.neusoft.po.Deliveryaddress;
import com.neusoft.service.UserAddressService;

@Service
public class UserAddressImpl implements UserAddressService {
	
	@Autowired
	UserAddressMapper userAddressMapper;

	@Override
	public List<Deliveryaddress> listDeliveryAddressByUserId(String userId) {
		// TODO Auto-generated method stub
		return userAddressMapper.listDeliveryAddressByUserId(userId);
	}

	@Override
	public Deliveryaddress getDeliveryAddressById(int daId) {
		// TODO Auto-generated method stub
		return userAddressMapper.getDeliveryAddressById(daId);
	}

	@Override
	public int saveDeliveryAddress(Deliveryaddress deliveryaddress) {
		// TODO Auto-generated method stub
		return userAddressMapper.saveDeliveryAddress(deliveryaddress);
	}

	@Override
	public int updateDeliveryAddress(Deliveryaddress deliveryaddress) {
		// TODO Auto-generated method stub
		return userAddressMapper.updateDeliveryAddress(deliveryaddress);
	}

	@Override
	public int removeDeliveryAddress(int daId) {
		// TODO Auto-generated method stub
		return userAddressMapper.removeDeliveryAddress(daId);
	}

}
